<template>
  <div id="app">
    <router-view v-if="isRouterAlive"></router-view>
   <!--<router-view/>-->
  </div>
</template>


<script>
  import VueAudio from "./components/header/VueAudio.vue"
export default {
  name: 'App',
  components:{
    VueAudio
  },
//刷新
  provide(){
    return {
      reload:this.reload
    }
  },

  data(){
    return{
      isRouterAlive:true
    }
  },
  methods:{
    //刷新的函数  异步执行
    reload(){
      this.isRouterAlive = false
      this.$nextTick(function(){
        this.isRouterAlive = true
      })
    }
  }
}
</script>

<style>
@import "assets/css/reset.css";
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  
}
</style>
